import type { ISchema } from '@formily/vue'
import modifySchema from '@/utils/modifySchema'
import { StudentSchema } from '@/views/schema/user'

export default {
  type: 'object',
  properties: {
    layout: {
      'type': 'void',
      'x-component': 'FormLayout',
      'x-component-props': {
        labelWidth: 100,
      },
      'properties': {
        gird: {
          'type': 'void',
          'x-component': 'FormGrid',
          'x-component-props': {
            minColumns: 2,
            maxColumns: 2,
          },
          'properties': modifySchema(StudentSchema(), {
            nickName: {
              required: true,
            },
            deptId: {
              required: true,
            },
            sex: {
              required: true,
            },
            status: {
              required: true,
            },
            remark: {
              'x-decorator-props': {
                gridSpan: 'span 2',
              },
            },
          }),
        },
      },
    },
  },
} as ISchema
